package com.showtao.front.domain;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Base Domain class, should be extended Business domain classes.
 * 
 * @author Tao Shi
 * 
 */
@SuppressWarnings("serial")
@MappedSuperclass
public class BaseDomain implements Serializable {

	@Column(name="created_at")
    private Date createdAt;
	@Column(name="created_by")
    private String createdBy;
	@Column(name="updated_at")
    private Date updatedAt;
	@Column(name="updated_by")
    private String updatedBy;

    public BaseDomain() {
        this.createdAt = Calendar.getInstance().getTime();
        this.updatedAt = Calendar.getInstance().getTime();
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }

}
